using UnityEngine;

public class Booster : MonoBehaviour
{
	private BoostConditions _boostConditions;

	private bool _got;

	[SerializeField]
	private GameObject[] _boosters;

	private void Start()
	{
		_boostConditions = Object.FindObjectOfType<BoostConditions>();
	}

	public void GetBooster()
	{
		if (!_got)
		{
			_got = true;
			GetComponent<SphereCollider>().enabled = false;
			GameObject obj = _boosters[_boostConditions.SuitableBooster()];
			obj.transform.parent = null;
			obj.SetActive(value: true);
			base.gameObject.SetActive(value: false);
		}
	}
}
